package com.shujia.day14;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Code12BufferedWriter {
    public static void main(String[] args) throws IOException {
        /*
             Writer子类 创建方式有哪几种？
                ① OutputStreamWriter  class OutputStreamWriter extends Writer {
                ② FileWriter  class FileWriter extends OutputStreamWriter {
         */
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("data/bb.txt"));

        bufferedWriter.write("这是BufferedWriter缓冲字符流写出的数据");
        bufferedWriter.newLine();
        bufferedWriter.write("BufferedWriter缓冲字符流很常用需要记住");
        bufferedWriter.close();

    }
}
